package com.bizihang.dto;

import com.fasterxml.jackson.annotation.JsonView;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldDefaults;

import java.util.Date;

/**
 * @author 毕子航 951755883@qq.com
 * @date 2018/08/14
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
public class User {
	int id;
	@JsonView(UserSimpleView.class)
	String username;

	@JsonView(UserDetailView.class)
	String password;

	Date ctime;

	public User(String username, String password) {
		this.username = username;
		this.password = password;
	}

	public interface UserSimpleView {
	}

	public interface UserDetailView extends UserSimpleView {
	}
}
